package com.fz.us.oa.core.entity.com;

import com.fz.us.admin.company.entity.BaseFlowEntity;
import com.fz.us.admin.company.entity.Department;
import com.fz.us.admin.company.entity.Post;

import javax.persistence.*;

/**
 * Created by ZhuChunXiao on 2017/5/23.
 * 调动申请
 */
@Entity
@Table(name="ec_transfer")
public class Transfer extends BaseFlowEntity {
    private static final long serialVersionUID = 6010615570110780247L;
    /**
     * 人事信息表
     */
    private PersonnelInfo personnelInfo;
    /**
     * 调动原因
     */
    private String reason;
    /**
     * 调往部门
     */
    private Department department;
    /**
     * 调往岗位
     */
    private Post post;
    /**
     * 原薪资
     */
    private Double oldSalary;
    /**
     * 新薪资
     */
    private Double newSalary;
    /**
     * 异动管理
     */
    private AllChange allChange;

    @ManyToOne(fetch = FetchType.LAZY)
    public PersonnelInfo getPersonnelInfo() {
        return personnelInfo;
    }

    public void setPersonnelInfo(PersonnelInfo personnelInfo) {
        this.personnelInfo = personnelInfo;
    }

    public String getReason() {
        return reason;
    }

    public void setReason(String reason) {
        this.reason = reason;
    }

    @ManyToOne(fetch = FetchType.LAZY)
    public Department getDepartment() {
        return department;
    }

    public void setDepartment(Department department) {
        this.department = department;
    }

    @ManyToOne(fetch = FetchType.LAZY)
    public Post getPost() {
        return post;
    }

    public void setPost(Post post) {
        this.post = post;
    }

    public Double getOldSalary() {
        return oldSalary;
    }

    public void setOldSalary(Double oldSalary) {
        this.oldSalary = oldSalary;
    }

    public Double getNewSalary() {
        return newSalary;
    }

    public void setNewSalary(Double newSalary) {
        this.newSalary = newSalary;
    }

    @OneToOne(fetch = FetchType.LAZY)
    public AllChange getAllChange() {
        return allChange;
    }

    public void setAllChange(AllChange allChange) {
        this.allChange = allChange;
    }
}
